package com.lanou.bbs.service.impl;

import com.lanou.bbs.dao.TopicDao;
import com.lanou.bbs.entity.BbsReply;
import com.lanou.bbs.entity.BbsTopic;
import com.lanou.bbs.entity.User;
import com.lanou.bbs.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * @Author 张贵宏
 * @Date 18/6/19 下午7:29
 */
@Service
public class TopicServiceImpl implements TopicService {

    @Autowired
    private TopicDao topicDao;


    @Override
    public List<BbsTopic> findAll() {
        return topicDao.findAll();
    }

    @Override
    public BbsTopic findById(int tid) {
        return topicDao.findById(tid);
    }

    @Override
    public void send(BbsTopic bbsTopic) {


        topicDao.send(bbsTopic);
    }

    @Override
    public void updateTopic(BbsTopic bbsTopic) {
        topicDao.updateTopic(bbsTopic);
    }


}
